<template>
  <div class="son">
    {{ sonMsg }}
    <br />
    <button @click="sonClick">子调用父</button>
  </div>
</template>
<script>
export default {
  data () {
    return {
      sonMsg: '我是son子组件',
      xxx: 123,
      xxx2: 456
    }
  },
  created () {
    this.sonMsg = '我是son子组件xxx'
  },
  methods: {
    sonClick () {
      this.$parent.appMsg = Date.now() + '这是子组件修改的'
    }
  }
}
</script>
<style>
.son {
  width: 300px;
  height: 300px;
  background-color: #00f;
}
</style>
